x86: correct create_bounce_frame
authorJan Beulich <jbeulich@suse.com>
Mon, 8 May 2017 12:55:20 +0000 (14:55 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 8 May 2017 12:55:20 +0000 (14:55 +0200)
commit1c5e242e6d6e51fe6ec3553299ec7efc48938c56
tree1fe76fc94a4b2f87d6e8d5a60434a6e2e0ffe91c
parent461f0482033b09ade2f3e38c8c33f1c15bc8defc
x86: correct create_bounce_frame

Commit d9b7ef209a7 ("x86: drop failsafe callback invocation from
assembly") didn't go quite far enough with the cleanup it did: The
changed maximum frame size should also have been reflected in the early
address range check (which has now been pointed out to have been wrong
anyway, using 60 instead of 0x60), and it should have updated the
comment ahead of the function.

Also adjust the lower bound - all is fine (for our purposes) if the
initial guest kernel stack pointer points right at the hypervisor base
address, as only memory _below_ that address is going to be written.

Additionally limit the number of times %rsi is being adjusted to what
is really needed.

Finally move exception fixup code into the designated .fixup section
and macroize the stores to guest stack.

Reported-by: Jann Horn <jannh@google.com>
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Release-acked-by: Julien grall <julien.grall@arm.com>
xen/arch/x86/x86_64/entry.S